package org.vectrics.skill.struts;

import org.apache.log4j.Logger;
import org.vectrics.user.User;
import org.vectrics.common.html.*;



public class JobSkillEntryTag extends EnterDetailSkillsTagAbstract {

	private static final long serialVersionUID = -5909806339537985848L;

	private String jobId = null;
	
	public static String FORM_ACTION = "/admin/job/skill/nextSkillEntry.do";
	private User user = null;
	private transient static Logger log = Logger.getLogger(JobSkillEntryTag.class);

	/*
	protected User getUser() throws SkillException {
		if (user == null) {
			UserManager userMgr = new UserManager();
			try {
				user = userMgr.findUserById(id);
			}
			catch (DataException de) {
				log.error("DataException finding user, id = " + id);
				throw new SkillException("DataException finding user, id = " + id);
			}
		}
		return(user);
	}
	*/
	protected void addHiddenInputs(Form form) {
		form.addHidden("jobId", this.getOwnerObjectId());
	}
	
	
	protected String getFormAction() {
		String path = getContextPath()  + FORM_ACTION; 
		return(path);
	}

	
	protected String getOwnerObjectId() {
		return(getJobId());
	}

	protected int getWidth() {
		return 500;
	}

	protected boolean alwaysShowLevelEntry() {
		return(false);
	}
	
	
	protected boolean getShowViewChildren() {
		return false;
	}

	protected boolean getShowYesNo() {
		return true;
	}

	protected boolean getShowYears() {
		return true;
	}

	protected boolean getShowChildren() {
		return false;
	}

	protected boolean getShowRating() {
		return true;
	}

	/**
	 * @return Returns the jobId.
	 */
	public String getJobId() {
		return jobId;
	}

	/**
	 * @param jobId The jobId to set.
	 */
	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

}
